#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 0;
	int count = 0;
	scanf("%d",&a);
	for (int i = 1;i <= 32;i++)
	{
		if (a & 1 == 1)
		{
			count++;
		}
		a=a >> 1;
	}
	printf("%d",count);
	return 0;
}
